class Maybe {
    constructor(value) {
        this._value = value
    }
    _value = undefined
    static of(value) {
        return new Maybe(value)
    }
    map(excutor) {
        let newVal = this._value ? excutor(this._value) : this._value
        return new Maybe(newVal)
    }
}

class Container {
    constructor(value) {
        this._value = value
    }
    _value = undefined
    static of(value) {
        return new Maybe(value)
    }
    map(excutor) {
        let newVal = this._value ? excutor(this._value) : this._value
        return new Maybe(newVal)
    }
}

module.exports = { Maybe, Container }